﻿<script type="text/javascript">
    $(function () {
        $('#Time').blur(
        function () {
            //alert($(this).val());
            $(this).val($(this).val().replace("：", ":"));
        }
        );
    });
</script>

@model AuditWeb.Models.AdminArchiveModel

@{
    ViewBag.Title = AuditResources.UI.PageTitle;
    Layout = "~/Views/Shared/CountyAdmin/_CountyAdminLayout.cshtml";
    IEnumerable<AuditModel.Archive> archives = (List<AuditModel.Archive>)ViewBag.Archives;
}

<h2>@AuditResources.Archive.ObjectName<text>管理</text></h2>

<p>
    @Html.ActionLink(AuditResources.UI.Create, "Create", new { annualeventid = ViewBag.AnnualEventId }, new { Class = "button" })
</p>
<div class="padding_panel">
@using (Html.BeginForm("Archives"))
{
    @Html.Hidden("id", Model.AnnualEventId)
    @AuditResources.Subject.ObjectName<text>:</text> @Html.DropDownList("SubjectId", AuditResources.UI.All) 
     <input type="submit" value="@AuditResources.UI.Search" /> 
}
</div>
@using (Html.BeginForm("SetClassDateTime", "CountyAdmin"))
{
    @Html.ValidationSummary(true)
    @Html.Partial("_ArchivesGrid", archives)
    if (((SelectList)ViewBag.AvailableDates).Count() > 0)
    {
    <div class="padding_panel">    
    <text>批量设置: </text>
    <select name="DateType">
        <option value="0" selected>听课日期时间</option>
    </select>
    <text>设定值: </text>
    @Html.DropDownList("Date", (SelectList)ViewBag.AvailableDates)
    <input id="Time" name="Time" type="text" value="" />
    @Html.ValidationMessageFor(model => model.Time)
    @Html.HiddenFor(model => model.AnnualEventId)
    @Html.HiddenFor(model => model.ArchiveId)
    @Html.HiddenFor(model => model.CountyCode)
    @Html.HiddenFor(model => model.SubjctId)
    <input type="submit" value="设置" />    
    </div>
    <div>(注意：日期填写格式yyyy-mm-dd，如2012-12-24; 时间格式24小时制hh:mm，如8:00, 20:00)</div>
    }
    else
    {
        <div class="padding_panel">目前无法指定上课日期和时间。</div>
    }
}

